#ifndef SAVEDATA_H
#define SAVEDATA_H

#include <QObject>
#include <QDir>
#include <QFile>
#include <QTextStream>
#include <QDateTime>
#include <QMessageBox>

class SaveData : public QObject{
    Q_OBJECT

private:
    QDir * dir = nullptr;
    QFile * file = nullptr;
    static SaveData * datafile;

    SaveData(void);
    SaveData(const SaveData &other) = delete;
    SaveData &operator = (const SaveData &other) = delete;

public:
    static SaveData * getInstance(void);

    ~SaveData(void);

public slots:
    void saveData(QString info);

signals:
    void saveDataOpenFileDefeat(QFile::FileError error);

};

#endif // SAVEDATA_H
